<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
    <%
    request.setCharacterEncoding("UTF-8");
    response.setCharacterEncoding("UTF-8");
    %>
    
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户注册</title>
</head>
<body>
	<form action="gr.do">
		登录名：<input name="logid" value="ttc" />
		密码：<input name="logpwd"  type="password" value="123456" />
		验证码登录名：<input name="authcode" value="" />
		<img id="authcode" alt="authcode"  src="authcode" />
		<input type="submit" value="提交" />
		<input type="button" onclick="refreshcode()" value="刷新验证码"></input>
	</form>

</body>
</html>
<script>
function refreshcode(){
	const  img1 =  document.getElementById("authcode");
	img1.src= "asdf" +  new Date().getTime();
	img1.src="authcode?=" + new Date().getTime();
}
</script>

